<template>
<view class="health_center-main page-view">
	<view class="top-wrap">
		<view class="pet-list">
			<view :class="['item', {'item-selected': index == 0}]" v-for="(item, index) in 2">
				旺财
			</view>
		</view>
		<view class="add-btn btn" @click="$router.to('add_pet')">
			<image src="@/static/images/icon/add.png"></image>
			<text>新增</text>
		</view>
	</view>
	
	<view class="pet-info-wrap">
		<image class="head-picture" src="@/static/images/a.jpg"></image>
		<view class="detail">
			<view class="type">金毛</view>
			<view class="sex-age">
				<view>男</view>
				<view></view>
				<view>7岁</view>
			</view>
			<view class="age-like">
				相当于人类8岁
			</view>
		</view>
	</view>
	
	<view class="heath-file">
		<view class="title">健康档案</view>
		<view class="file-list">
			<view class="item bc-1 btn" @click="$router.toPageFileRecord(1)">
				<view>绝育</view>
				<view>建议1年1次</view>
			</view>
			<view class="item bc-2 btn" @click="$router.toPageFileRecord(2)">
				<view>驱虫 </view>
				<view>建议1年1次</view>
			</view>
			<view class="item bc-3 btn" @click="$router.toPageFileRecord(3)">
				<view>免疫</view>
				<view>建议1年1次</view>
			</view>
			<view class="item bc-4 btn" @click="$router.toPageFileRecord(4)">
				<view>体检</view>
				<view>建议1年1次</view>
			</view>
		</view>
	</view>
</view>
</template>

<script>
export default {
	data() {
		return {
			
		};
	}
}
</script>

<style lang="less">
.health_center-main {
	padding: 0 40rpx;
	
	.top-wrap {
		display: flex;
		align-items: center;
		gap: 40rpx;
		
		.pet-list {
			flex: 1;
			overflow-x: auto;
			display: flex;
			gap: 60rpx;
			
			.item {
				display: flex;
				align-items: center;
				height: 85rpx;
				flex-shrink: 0;
				font-size: 32rpx;
				font-weight: 350;
				line-height: 36rpx;
				color: #6E6E6E;
				border-bottom: 6rpx solid #FFFFFF;
				transition: .2s;
			}
			
			.item-selected {
				border-color: #FF6D03;
				font-weight: bold;
				color: #333333;
			}
		}
		
		.add-btn {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 120rpx;
			height: 56rpx;
			border-radius: 8rpx;
			background: #FF6D03;
			gap: 8rpx;
			
			>image {
				width: 20rpx;
				height: 20rpx;
			}
			
			>text {
				font-size: 24rpx;
				color: #F8F8F8;
			}
		}
	}
	
	.pet-info-wrap {
		display: flex;
		gap: 20rpx;
		width: 100vw;
		position: relative;
		right: 40rpx;
		margin-top: 20rpx;
		padding: 14rpx 36rpx 24rpx;
		border-top: 1rpx solid #F7F9FD;
		border-bottom: 1rpx solid #F7F9FD;
		
		.head-picture {
			width: 123rpx;
			height: 123rpx;
			border-radius: 100%;
		}
		
		.detail {
			flex: 1;
			
			.type {
				font-size: 36rpx;
				font-weight: bold;
				color: #3D3D3D;
			}
			
			.sex-age {
				margin-top: 10rpx;
				display: flex;
				align-items: center;
				gap: 18rpx;
				
				>view {
					font-size: 24rpx;
					color: #3D3D3D;
					
					&:nth-child(2) {
						width: 1rpx;
						height: 16rpx;
						background: #D8D8D8;
					}
				}
			}
			
			.age-like {
				font-size: 24rpx;
				color: #3D3D3D;
				margin-top: 8rpx;
			}
		}
	}
	
	.heath-file {
		margin-top: 62rpx;
		
		.title {
			font-size: 34rpx;
			line-height: 44rpx;
			color: #112950;
		}
		
		.file-list {
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			margin-top: 24rpx;
			gap: 24rpx 0;
			
			.item {
				width: 325rpx;
				height: 155rpx;
				border-radius: 10rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				padding: 0 24rpx;
				gap: 12rpx;
				
				>view {
					&:nth-child(1) {
						font-size: 28rpx;
						font-weight: bold;
						line-height: 1.4;
						color: #3D3D3D;
					}
					
					&:nth-child(2) {
						font-size: 18rpx;
						line-height: 1.4;
						color: #6F6F6F;
					}
				}
			}
			
			.bc-1 {
				background: #DDF1FF;
			}
			.bc-2 {
				background: #FFE6DE;
			}
			.bc-3 {
				background: #FFF6D9;
			}
			.bc-4 {
				background: #F2E3FF;
			}
		}
	}
}
</style>
